package com.feibiao.computer;

public class FactoryProducer {
    public static AbstractFactory getFactory(String operator){
        if (operator.equals("+") || operator.equals("-") ||operator.equals("*") ||operator.equals("/") ||operator.equals("^")) {
            return new TwoOperandComputeFactory();
        }
        else if(operator.equals("!")) {
            return new OneOperandComputeFactory();
        }else{
            return null;
        }
    }
}
